import request from '@/utils/request'

// 查询景点列表
export function listAttraction(query) {
  return request({
    url: '/ms/attraction/pageinquire',
    method: 'get',
    params: query
  })
}
// 查询景点图片
export function listAttractionImage(query) {
  return request({
    url: '/ms/attraction/attractionphotoinquire',
    method: 'get',
    params: query
  })
}

// 查询景点详细
export function getAttraction(attractionId) {
  return request({
    url: '/ms/attraction/attractiondetail/' + attractionId,
    method: 'get'
  })
}

// 新增景点
export function addAttraction(data) {
  return request({
    url: '/ms/attraction/attractionadd',
    method: 'POST',
    data: data
  })
}
// 新增景点图片
export function addAttractionImage(data) {
  return request({
    url: '/ms/attraction/attractionphotoadd',
    method: 'POST',
    data: data
  })
}

// 修改景点
export function updateAttraction(data) {
  return request({
    url: '/ms/attraction/attractionupadte',
    method: 'put',
    data: data
  })
}

// 删除景点
export function delAttraction(AttractionId) {
  return request({
    url: '/ms/attraction/attractiondelete/' + AttractionId,
    method: 'delete'
  })
}
// 删除景点图片
export function delAttractionImage(photoId) {
  return request({
    url: '/ms/attraction/attractionphotodelete/' + photoId,
    method: 'delete'
  })
}
